﻿using System;
using System.Text.RegularExpressions;
using Common;
using Common.ParameterLocator;

namespace SpecFlowTfsLinker.Cleaner
{
    [Serializable]
    public class StatementCleaner : Cleaner
    {
        public StatementCleaner(string statementToClean) : base(statementToClean)
        {
        }

        public override string Clean()
        {
            StatementToClean = DeleteExternalWhiteSpace();
            StatementToClean = StatementToClean.ReplaceWordChars();
            StatementToClean = Regex.Replace(StatementToClean, ServiceParameter.Instance.Parameter.RegexCleanStatement, string.Empty, RegexOptions.IgnoreCase);
            
            return DeleteExternalWhiteSpace();
        }
    }
}